<?php
/**
 * Created by PhpStorm.
 * User: silenceper
 * Date: 16/9/12
 * Time: 下午4:43
 */

namespace common\entities\myhtsq;


use common\entities\ConfigEntity;


/**
 * This is the model class for table "myscrm_contract_overview".
 *
 * @property string $id
 * @property string $contract_id
 * @property string $organization_id
 * @property string $overview
 * @property string $updated_at
 * @property string $created_at
 */
class ContractOverviewEntity extends ConfigEntity {
    /**
     * @inheritdoc
     */
    public static function tableName() {
        return 'myscrm_contract_overview';
    }

    /**
     * @inheritdoc
     */
    public function rules() {
        return [
            [['id', 'contract_id', 'organization_id', 'updated_at', 'created_at'], 'required'],
            [['overview'], 'string'],
            [['updated_at', 'created_at'], 'safe'],
            [['id', 'contract_id', 'organization_id'], 'string', 'max' => 36],
            [['contract_id'], 'unique'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels() {
        return [
            'id' => 'ID',
            'contract_id' => 'Contract ID',
            'organization_id' => 'Organization ID',
            'overview' => '概览json数据',
            'updated_at' => 'Updated At',
            'created_at' => 'Created At',
        ];
    }
}